package org.liang.auth.service.impl;

import org.liang.auth.domain.Menu;
import org.liang.auth.mapper.MenuMapper;
import org.liang.auth.service.IMenuService;
import org.liang.base.service.impl.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.*;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author liang
 * @since 2024-01-17
 */
@Service
@Transactional(propagation = Propagation.SUPPORTS,readOnly = true)
public class MenuServiceImpl extends BaseServiceImpl<Menu> implements IMenuService {

    @Autowired
    private MenuMapper menuMapper;

    @Override
    public List<Menu> getParent() {
        return menuMapper.getParent();
    }

    @Override
    public List<Menu> queryMenuTree(Long id) {
        return menuMapper.queryMenuTree(id);
    }

}
